From: Carlos Garnacho Date: Tue, 25 Jul 2017 13:37:10 +0000 (+0200) Subject: gdkwindow: Update cursor for tablet tools in the window X-Git-Tag: archive/raspbian/3.24.39-1+rpi1~1^2~65^2~39^2~457 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=18eeaf704ec93105b4bdc3408d9f8cd3909af757;p=gtk%2B3.0.git gdkwindow: Update cursor for tablet tools in the window This check must be done explicitly on Wayland as the master device for tablet tools differ from the Core Pointer. This ensures that whenever a tablet tool is inside a window and the cursor is programmatically changed, it will be visually updated too. https://bugzilla.gnome.org/show_bug.cgi?id=785375 --- diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c index 689d666100..1c7ea5340c 100644 --- a/gdk/gdkwindow.c +++ b/gdk/gdkwindow.c @@ -6583,8 +6583,18 @@ gdk_window_set_cursor (GdkWindow *window, for (s = seats; s; s = s->next) { + GList *devices, *d; + device = gdk_seat_get_pointer (s->data); gdk_window_set_cursor_internal (window, device, window->cursor); + + devices = gdk_seat_get_slaves (s->data, GDK_SEAT_CAPABILITY_TABLET_STYLUS); + for (d = devices; d; d = d->next) + { + device = gdk_device_get_associated_device (d->data); + gdk_window_set_cursor_internal (window, device, window->cursor); + } + g_list_free (devices); } g_list_free (seats);